﻿using System.Linq;

namespace SopCastRecorder
{
	public class Channel
	{
		public string Name { get; set; }
		public string Address { get; set; }
		public override string ToString()
		{
			return this.Name;
		}

		public static string GetAddress(string name)
		{
			var v =
				from p in OptionFile.Option1.Channels
				where p.Name == name
				select p;
			if (v.Count() > 0)
			{
				return v.First().Address;
			}
			else
			{
				return null;
			}
		}
	}
}
